package com.glenet.salary.dao;

import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.session.SqlSession;

import com.glenet.salary.entities.HrUser;
import com.glenet.salary.util.SessionFactoryUtil;

/**
 * @author MeiWenhui
 * 
 */
public class HrUserDao {


	public HrUser signIn(String username, String password) {
		HrUser user = null;
		try {
			SqlSession session = SessionFactoryUtil.openSession();
			Map<String, String> map = new Hashtable<String, String>();
			map.put("username", username);
			map.put("password", password);
			user = (HrUser) session.selectOne("HrUser.signIn", map);
			session.commit();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return user;
	}
}
